package com.iisigroup.adrclient.vo;

public class AdrStrBlockOrderVO {
	
	private String year;
	private String countyCode;
	private String areaCode;
	private String countyName;
	private String townName;
	private String vil;
	private String str;
	private String sec;
	private String secC;
	private String lan;
	private String lanC;
	private String aly;
	private String alyC;
	private String subAly;
	private String subAlyC;
	private String no1;
	private String oddEven;
	
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	public String getCountyCode() {
		return countyCode;
	}
	public void setCountyCode(String countyCode) {
		this.countyCode = countyCode;
	}
	public String getAreaCode() {
		return areaCode;
	}
	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}
	public String getCountyName() {
		return countyName;
	}
	public void setCountyName(String countyName) {
		this.countyName = countyName;
	}
	public String getTownName() {
		return townName;
	}
	public void setTownName(String townName) {
		this.townName = townName;
	}
	public String getVil() {
		return vil;
	}
	public void setVil(String vil) {
		this.vil = vil;
	}
	public String getStr() {
		return str;
	}
	public void setStr(String str) {
		this.str = str;
	}
	public String getSec() {
		return sec;
	}
	public void setSec(String sec) {
		this.sec = sec;
	}
	public String getSecC() {
		return secC;
	}
	public void setSecC(String secC) {
		this.secC = secC;
	}
	public String getLan() {
		return lan;
	}
	public void setLan(String lan) {
		this.lan = lan;
	}
	public String getLanC() {
		return lanC;
	}
	public void setLanC(String lanC) {
		this.lanC = lanC;
	}
	public String getAly() {
		return aly;
	}
	public void setAly(String aly) {
		this.aly = aly;
	}
	public String getAlyC() {
		return alyC;
	}
	public void setAlyC(String alyC) {
		this.alyC = alyC;
	}
	public String getSubAly() {
		return subAly;
	}
	public void setSubAly(String subAly) {
		this.subAly = subAly;
	}
	public String getSubAlyC() {
		return subAlyC;
	}
	public void setSubAlyC(String subAlyC) {
		this.subAlyC = subAlyC;
	}
	public String getNo1() {
		return no1;
	}
	public void setNo1(String no1) {
		this.no1 = no1;
	}
	public String getOddEven() {
		return oddEven;
	}
	public void setOddEven(String oddEven) {
		this.oddEven = oddEven;
	}
	
	@Override
	public String toString() {
		return "AdrStrBlockOrderVO [year=" + year + ", countyCode="
				+ countyCode + ", areaCode=" + areaCode + ", countyName="
				+ countyName + ", townName=" + townName + ", vil=" + vil
				+ ", str=" + str + ", sec=" + sec + ", secC=" + secC + ", lan="
				+ lan + ", lanC=" + lanC + ", aly=" + aly + ", alyC=" + alyC
				+ ", subAly=" + subAly + ", subAlyC=" + subAlyC + ", no1="
				+ no1 + ", oddEven=" + oddEven + "]";
	}
	
	@Override
	public boolean equals(Object obj) {
		boolean result = true;
		if (obj instanceof AdrStrBlockOrderVO) {
			AdrStrBlockOrderVO vo = (AdrStrBlockOrderVO) obj;
			result = result ? this.same(this.areaCode, vo.areaCode) : result;
			result = result ? this.same(this.str, vo.str) : result;
			result = result ? this.same(this.sec, vo.sec) : result;
			result = result ? this.same(this.lan, vo.lan) : result;
			result = result ? this.same(this.aly, vo.aly) : result;
			result = result ? this.same(this.subAly, vo.subAly) : result;
//			result = result ? this.no1.equals(vo.no1) : result;
			result = result ? this.same(this.oddEven, vo.oddEven) : result;
		}
		return result;
	}
	
	private boolean same(String o1, String o2) {
		if (o1 != null) {
			if (o2 == null) {
				return false;
			} else {
				return o1.equals(o2);
			}
		} else {
			if (o2 != null) {
				return false;
			} else {
				return true;
			}
		}
	}
	
}
